package com.salton123.soulove.biz_bmob.aty

import android.os.Bundle
import com.alibaba.android.arouter.facade.annotation.Route
import com.alibaba.android.arouter.launcher.ARouter
import com.hjq.toast.ToastUtils
import com.salton123.soulove.api.ProviderManager
import com.salton123.soulove.biz_bmob.R
import com.salton123.soulove.common.Constants
import com.salton123.ui.base.BaseActivity
import kotlinx.android.synthetic.main.activity_setting.*

/**
 * User: wujinsheng1@yy.com
 * Date: 2020/4/22 21:31
 * ModifyTime: 21:31
 * Description:
 */
@Route(path = Constants.Router.User.SETTING)
class SettingActivity : BaseActivity() {
    override fun initViewAndData(savedInstanceState: Bundle?) {
        sb_setting_exit.setOnClickListener {
            ProviderManager.user()?.logout()
            var path = Constants.Router.Xmly.MAIN
            ARouter.getInstance().build(path)
                .navigation(activity())
            ToastUtils.show("已经退出帐号")
        }
    }

    override fun getTitleText(): String {
        return getString(R.string.setting_title)
    }

    override fun getLayoutId(): Int = R.layout.activity_setting
}